
<link rel="stylesheet" href="/assets/home/css/comment.css">


<body>
    <img src="{$subject.thumbs}" style="width:100%;">
    <div class="weui-cells__title" style="font-size:16px;">{$subject.title}</div>
    <form method="post">
        <div class="weui-cells weui-cells_form">
            <div class="weui-cell">
                <div class="weui-cell__bd">
                    <textarea class="weui-textarea" placeholder="请输入内容" name="content" rows="3" maxlength="200"></textarea>
                    <div class="weui-textarea-counter"><span>0</span>/200</div>
                </div>
            </div>
        </div>
        <div class="action">
            <button type="submit" class="mui-btn mui-btn-primary">立即提交</button>
        </div>
    </form>


</body>

<script>
    $('.weui-textarea').on('input', function(){
        const len = $(this).val().length;

        $('.weui-textarea-counter span').html(len)
    })
</script>

